<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=[1,4,2,5,1,4,6,7,8,4,8,9,4,2,4,7,3,5];
        var arr2=Array.from(new Set(arr));
        console.log(arr2.sort());

        
    </script>
</body>
</html>